package com.wen.service.Impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.wen.mapper.PayMapper;

import com.wen.pojo.Pay;

import com.wen.pojo.dto.PayDto;
import com.wen.pojo.vo.PayVo;
import com.wen.service.PayService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class PayServiceImpl extends ServiceImpl<PayMapper, Pay> implements PayService {
    @Autowired
    private  PayMapper payMapper;
    @Override
    public Page<Pay> pageListPay(PayVo payVo, Long pageNum, Long pageSize) {
        Page<Pay> payPage = new Page<>(pageNum, pageSize);
        Page<Pay> payPage1 = payMapper.pageListPay(payPage, payVo);
        return payPage1;
    }

    @Override
    public PayDto payById(String id) {
        PayDto payDto = payMapper.payById(id);
        return payDto;
    }

    @Override
    public boolean UpPay(String id) {
        boolean flag = payMapper.UpPay(id);
        return flag;
    }
}
